package com.lsy.on_line;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMethod;

@SpringBootApplication
@MapperScan("com.lsy.on_line.zaixian.mapper")
@EnableTransactionManagement//开启事务
@CrossOrigin(origins = "http://127.0.0.1",
		methods = {RequestMethod.GET, RequestMethod.POST,
				RequestMethod.DELETE, RequestMethod.PUT},
		allowedHeaders = "*")//跨域访问注解形式配置--与相应跨域处理类类似 也可在nginx反向代理转发服务器中配置解决
public class OnLineApplication {

	public static void main(String[] args) {
		SpringApplication.run(OnLineApplication.class, args);
	}

}
